const { default: request } = require('@/utils/request')

// 获取列表信息
export const getEmployeeList = params => request.get('/sys/user', { params })
// 导出
export const getExport = () => request.get('/sys/user/export', { responseType: 'blob' })
// 下载导入员工模板
export const getDownload = () => request.get('/sys/user/import/template', { responseType: 'blob' })
// 批量-导入员工(上传excel)
export const setUploading = data => request.post('/sys/user/import', data)
// 删除
export const delEmployee = id => request.delete(`/sys/user/${id}`)
// 添加
export const addEmployee = data => request.post('/sys/user', data)
// 获取员工信息详情
export const getDetails = id => request.get(`/sys/user/${id}`)
// 编辑
export const updateEmployee = data => request.put(`/sys/user/${data.id}`, data)
